<!-- 
    author: ssc
    date: 2020-8-4
 -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>六边形</title>
    <style>
        * {
            box-sizing: border-box;
        }
        .box {
            width: 200px;
            position: relative;
            margin: 100px auto;
        }
        .items {
            position: absolute;
            border: 1px solid #f00;
        }
        .items::before {
            box-sizing: border-box;
            content: "";
            position: absolute;
            transform: rotate(60deg);
            border: 1px solid #f00;
        }
        .items::after {
            box-sizing: border-box;
            content: "";
            position: absolute;
            transform: rotate(-60deg);
            border: 1px solid #f00;
        }
        .out {
            
            z-index: 1;
        }
        .out, .out::before, .out::after {
            background-color: #ccc;
            width: 173.2px;
            height: 100px;
        }
        .mid {
            width: 166.3px;
            height: 96px;
            z-index: 2;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .mid, .mid::before, .mid::after {
            background-color: #fff;
        }
        .in {
            width: 155.9px;
            height: 90px;
            z-index: 3;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        .in, .in::before, .in::after {
            background-color: #ccc;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="out items">
            <!-- <div class="mid items">
                <div class="in items">
                </div>
            </div> -->
        </div>
    </div>
</body>
</html>